package com.portletinhell.cont;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;
import org.springframework.beans.factory.annotation.Autowired;

import com.portletinhell.service.PhraseService;


@Controller
public class MyCont {
	@Autowired
	private PhraseService ps;
	public void setPhraseService(PhraseService ps) {
	        this.ps = ps;
	}
	@RequestMapping("view")
	public ModelAndView handleRenderRequest(){
            ModelAndView model = new ModelAndView("View");
            model.addObject("Phrases", ps.getPhrases());
            return model;
	}
}

